 {include file="public/header" /}
 <body class="gray-bg">
 <div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        {include file="public/tophead" /}
        {include file="public/top" /}
        <div class="ibox-content">
        {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <form  method="get" action="" style="display: flex;">
                            <div class="pull-left search" style="display: flex;">
                                <div class="columns columns-right btn-group pull-left">
                                    <select class="form-control" name="search">
                                        <option value="user_id" {php}if(input('?param.search')){if(input('param.search')=='user_id'){echo "selected";} }{/php}>触发方ID</option>
                                        <option value="touserid" {php}if(input('?param.search')){if(input('param.search')=='touserid'){echo "selected";} }{/php}>匹配方ID</option>
                                    </select>
                                </div>

                                <div class="pull-right search">
                                    <input class="form-control input-outline" type="text"
                                           {php}
                                           if(input('?param.name')){
                                    if(input('param.name')){
                                    echo "value='".input('name')."'";
                                    }

                                    }
                                    {/php}
                                    name="name" placeholder="输入ID">
                                </div>

                                <div class="pull-right search">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7; border-left:0px" class="btn btn-default btn-outline" type="submit">搜索</button>
                                </div>

                                {php}
                                if(input('?param.name')){
                                {/php}
                                <div class="pull-right search">
                                    <a class="btn btn-w-m btn-link" href="{:url('systemPushVideoRecords')}">返回列表</a>
                                </div>{php}
                                }
                                {/php}
                            </div>
                        </form>
                    </div>
                    <div class="example">
                        <table data-toggle="table" data-striped="false">
                            <thead>
                                <tr>
                                    <th>触发方</th>
                                    <th>匹配方</th>
                                    <th>时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name="data" id="v"}
                                <tr id="id{$v.id}" class="class">
                                    <td>
                                        {php}
                                        $user=_user($v['user_id']);
                                        $touser=_user($v['touserid']);
                                        {/php}
                                        <a onclick="member('{$v.user_id}')" style="color:#40BCF7">{$user['name']}</a> <br />({$v.user_id})({$user['sex']})({$user['age']}岁)
                                    </td>
                                    <td>
                                        <a onclick="member('{$v.touserid}')" style="color:#40BCF7">{$touser['name']}</a> <br />({$v.touserid})({$touser['sex']})({$touser['age']}岁)
                                    </td>
                                    <td>{$v.time|date='Y-m-d H:i:s',###}</td>
                                    <td>
                                        <a onclick="chat('{$v.user_id},{$v.touserid}')" style="color:#40BCF7">查看对话</a>
                                    </td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>  
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{load href="__PLUGINS__layui/layui.js"}
<script type="text/javascript">
    
    function member(id)
    {
        layui.use('layer', function(){
            var layer = layui.layer;
            layer.open({
                title :'预览',
                area: ['100%', '100%'],
                type: 2,
                content: '{:url("member/index")}?search=id&name='+id
            });
        });
    }
    function chat(uids)
    {
        layui.use('layer', function(){
            var layer = layui.layer;
            layer.open({
                title :'预览',
                area: ['100%', '100%'],
                type: 2,
                content: '{:url("usertalk/records")}?search=userid&name='+uids
            });
        });
    }
</script>
{include file="public/footer" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}